package com.qingluan.dd.InetTool;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.Socket;
import java.net.URL;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class Bitmap_deal {


	Bitmap mBitmap;
	String imageUrl;
	HttpURLConnection conn ;
	int port ;
	Bitmap_deal(String Url,int port){
		this.port = port;
		this.imageUrl = Url;
	}
	public Bitmap get() throws IOException{
		Socket client = new Socket(this.imageUrl,this.port);
		InputStream IS = client.getInputStream();
		this.mBitmap = BitmapFactory.decodeStream(IS);
		if (mBitmap != null){
			return mBitmap;
	
		}
		return null;
	}
	
	

	
}
